#include "hmfs_test_utils.h"
#include <iostream>

using namespace OHOS::Hmfs;

int main(int argc, const char* argv[])
    {
    if (argc < 2) {
        std::cout<<"argc is too few"<<std::endl;
        return -1;
    }

    const std::string devPath(argv[1]);
    auto superBlock = std::make_unique<SuperBlockData>();
    GetSuperBlock(devPath, superBlock);
    PrintRawSBInfo(superBlock);


    auto checkPoint = std::make_unique<CheckPointData>();
    GetCheckPoint(devPath, checkPoint);
    PrintCPInfo(checkPoint);

    auto nodeData = std::make_unique<NodeData>();
    int16_t addrIndex = -1;
    GetInodeInfo(devPath, nodeData, addrIndex, GetLeValue(superBlock->rootInodeId));
    uint32_t features = GetLeValue(superBlock->features);
    PrintInodeInfo(features, nodeData, addrIndex, GetLeValue(superBlock->rootInodeId));

    return 0;
}